<?php

namespace Database\Seeders;

use App\Models\SystemAdmin;
use App\Models\User;
use Illuminate\Database\Seeder;

class SystemAdminSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //SystemAdmin::factory(1)->create();

        //创建一个管理员
        $systemadmin = SystemAdmin::create([
            'account'=>'super',
            'real_name'=>'管理员',
            'password'=>bcrypt('123123'),
        ]);

        $systemadmin->assignRole('super-admin');
    }
}
